package com.zm.scsimple.circuit.breaker.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;
import rx.Observable;
import rx.Observer;

import java.util.ArrayList;
import java.util.List;

import static java.lang.System.out;

/**
 * @author zoum
 * @create 2019/2/25 10:32
 */
@RestController
public class ProfileController {

    @Autowired
    private ProfileService profileService;

    @Autowired
    private ProfileService1 profileService1;

    @RequestMapping("/profile")
    public String hello() throws Exception{
        return profileService.profile();
    }

    @RequestMapping("/profile1")
    public String profile1() throws Exception{
        return profileService1.execute();
    }
}
